package br.com.clinica.supercao.animal.controller.view;

import org.apache.struts2.config.Action;
import org.apache.struts2.config.Result;
import org.apache.struts2.config.Results;

import br.com.clinica.supercao.entity.Animal;
import br.com.clinica.supercao.entity.Pessoa;
import br.com.clinica.supercao.entity.filter.AnimalSearchFilter;
import br.com.clinica.supercao.home.controller.AbstractSuperCaoAction;
import br.com.clinica.supercao.service.AnimalService;
import br.com.clinica.supercao.service.impl.AnimalServiceImpl;
import br.com.rpteixeira.exceptions.ServiceExcetion;
@Action(name="Animal!*",namespace="/model")
@Results({
	@Result(name=AnimalAction.INIT,value="/jsp/animal/cadastrarAnimal.jsp"),
	@Result(name=AnimalAction.INSERT_SUCCESS,value="/jsp/homeLogin/homeLogin.jsp"),
	@Result(name=AnimalAction.INSERT,value="/jsp/animal/cadastrarAnimal.jsp")
})
public class AnimalAction extends AbstractSuperCaoAction<Animal, AnimalSearchFilter, AnimalService> {
	private static final long serialVersionUID = 1L;
	private Pessoa dono;
	@Override
	protected AnimalService getEntityService() {
		return new AnimalServiceImpl();
	}
	public Pessoa getDono() {
		return dono;
	}
	public void setDono(Pessoa dono) {
		this.dono = dono;
	}
}
